package Test;

import com.imu.wys.dao.UserDao;
import com.imu.wys.dao.UserLogDao;
import com.imu.wys.model.User;

public class TestSql {
    public static void main(String[] args) {
        User user=new User();
        UserDao userDao = new UserDao();
        user = userDao.searchOne("select * from j1_user where username='32009091'");
        System.out.println(user.getPassword());
        UserLogDao userLogDao = new UserLogDao();
        userLogDao.add(user,"登录");

//        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
//        System.out.println(df.format(new Date()));// new Date()为获取当前系统时间
//            try {
//                InetAddress ip4 = Inet4Address.getLocalHost();
//                System.out.println(ip4.getHostAddress());
//            } catch (UnknownHostException e) {
//                e.printStackTrace();
//            }
    }
}
